const state = {
  carShopList: [],
}

const mutations = {
  // 存储店铺列表
  GETSHOPBYADDRESS(state, value) {
    state.carShopList = value
  },
}

const actions = {
  // 根据省份和城市获取有这个类型并且没被租借的车
  async getShopByAddress({ commit }, payload) {
    const ret = await reqShopByAddress(payload)
    if (ret.code == 200) commit('GETSHOPBYADDRESS', ret.data)
  },
}

//计算属性
const getters = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters,
}
